package models

type UserModel struct {
	Id       int    `gorm:"column:id;primary_key;auto_increment" json:"id"`
	UserName string `gorm:"column:user_name" json:"user_name"`
	Password string `gorm:"column:password" json:"password"`
}

func NewUserModel(name, password string) *UserModel {
	return &UserModel{
		UserName: name,
		Password: password,
	}
}

func (u *UserModel) TableName() string {
	return "user"
}
